<!DOCTYPE html>
<html>
    <head>
        <title>倒计时</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
        <script src="../../lib/jquery-1.8.0.min.js"></script>
        <script src="time.js"></script>
        <style>
            #time1{
                font-size: 16px;
            }
        </style>
    </head>
    <body>
        <p id="time1" data-time="1561525275538"></p>
        <p id="time2" data-time="1561525275538"></p>
        <p id="time3" data-time="1561525275538"></p>
        <script>
            var arr = [
                {
                    elem: $('#time1'),
                    value: $('#time1').data('time')
                },
                {
                    elem: $('#time2'),
                    value: $('#time2').data('time')
                },
                {
                    elem: $('#time3'),
                    value: $('#time3').data('time'),
                    obj: {
                        onlyOneDayTempHtml: 'HH时MM分SS秒',
                        dayTempHtml: '还有DD天HH时MM分'
                    }
                }
            ],
            obj = {
                onlyOneDayTempHtml: 'HH:MM:SS',
                dayTempHtml: '还有DD天'
            }
            startTime(arr)
        </script>
    </body>
</html>